Cost Reduction for Air Pressure System Failures of Scania Trucks

 

 

Purpose is to minimize maintenance costs of the air pressure system (APS) of Scania trucks.

Therefore, failures should be predicted before they occur. Falsely predicting a failure has a cost of 10, missing a failure a cost of 500. 

This leads to the need of cost minimization. The datasets' positive class consists of component failures for a specific component of the APS system. 

The negative class consists of trucks with failures for components not related to the APS. 

Data Set: 

Check the below link for more details. 
https://archive.ics.uci.edu/ml/datasets/APS+Failure+at+Scania+Trucks

 

Challenge metric

Cost-metric of miss-classification:

Predicted class | True class | | pos | neg |

pos | - | Cost_1 |

neg | Cost_2 | - |

Cost_1 = 10 and cost_2 = 500

The total cost of a prediction model the sum of 'Cost_1' multiplied by the number of Instances with type 1 failure and 'Cost_2' with the number of instances with type 2 failure, resulting in a 'Total_cost'.

In this case Cost_1 refers to the cost that an unnecessary check needs to be done by an mechanic at an workshop, while Cost_2 refer to the cost of missing a faulty truck, which may cause a breakdown.

Total_cost = Cost_1*No_Instances + Cost_2*No_Instances.

And my goal is to have loss i.e. total_cost (its score) less than < 9950. 

Objective is to minimize the cost.

 

Solution:

 

Confusion metrics

In [64]:
print(confusion_matrix(y_test, y_pred))
[[9379    1]
 [  20   56]]

 

Approach and observations:

  • Mean imputation for no values is done for the respective features. Then column standardization is done before feeding data to model.
  • Defined custom loss function as weel as scrorer for evaluation and to pass for cross validation respectively
  • Used xgBoost for hyper parameter tuning
  • Cost is been reduced to 10010 with best number of estimators 400. Our goal was to bring cost below 9950 is been achieved. Almost reached !
 
Previous Post Next Post